<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="mall/header::head-fragment('NewBee商城-选择支付方式','pay-select')">

</head>
<body>
<div class="pay-select-wrapper">
    <div class="page-main">
        <div class="container confirm-box">
            <form target="_blank" action="#" id="J_payForm" method="post">
                <div class="section section-order">
                    <div class="order-info clearfix">
                        <div class="fl">
                            <h2 class="title">订单提交成功！去付款咯～</h2>
                            <input type="hidden" id="orderNoValue" th:value="${orderNo}">
                            <p class="order-time" id="J_deliverDesc">订单号：
                                <th:block th:text="${orderNo}"></th:block>
                            </p>
                        </div>
                        <div class="fr">
                            <p class="total">
                                应付总额：<span class="money"><em><th:block
                                    th:text="${totalPrice+'.00'}"></th:block></em>元</span>
                            </p>
                        </div>
                    </div>
                </div>
                <div class="section section-payment">
                    <div class="cash-title" id="J_cashTitle">
                        选择以下支付方式付款
                    </div>

                    <div class="payment-box ">
                        <div class="payment-header clearfix">
                            <h3 class="title">支付平台</h3>
                            <span class="desc"></span>
                        </div>
                        <div class="payment-body">
                            <ul class="clearfix payment-list J_paymentList J_linksign-customize">
                                <li class="J_alipay">
                                    <input type="radio" name="payOnlineBank" id="alipay" value="paypal">
                                    <img onclick="payOrder(1)" th:src="@{/mall/image/pay/PayPal.jpg}" alt="paypal"
                                         style="margin-left: 0;" this.disabled=true;></li>
                                <!--
                                                            <li id="J_weixin">
                                                                <input type="radio" name="payOnlineBank" id="alipay" value="alipay">
                                                                <img onclick="payOrder(2)" th:src="@{/mall/image/pay/weixinpay.png}" alt="微信支付"
                                                                     style="margin-left: 0;">
                                                            </li>
                                                            <li class="J_bank">
                                                                <input type="radio" name="payOnlineBank" id="unionpay" value="unionpay">
                                                                <img th:src="@{/mall/image/pay/unionpay.png}" alt="银联"
                                                                     style="margin-left: 0;">
                                                            </li>-->
                            </ul>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <!-- 遮罩 -->
    <div class="container_div">
        <div class="bg">
            <div class="show">

            </div>
        </div>

    </div>



    <div th:replace="mall/footer::footer-fragment"></div>

</div>


</body>
<!-- jQuery -->
<script th:src="@{/admin/plugins/jquery/jquery.min.js}"></script>
<script th:inline="javascript">

    var show = document.getElementsByClassName("show");
    //show[0].style.display = "none";
    var bg = document.getElementsByClassName("bg");
    //bg[0].style.display = "none";
    //点击显示遮罩
    $('.J_alipay').click(function () {

        bg[0].style.display = "block";
        show[0].style.display = "block";
    })
    function payOrder(){
        var orderNo = $("#orderNoValue").val();
        $.get('/payOrderByPaypal?orderNo='+orderNo, function (data) {
            if(data["msg"]=="success"){
                window.location.href=data["data"];
            }
        });
    }

</script>
</html>